<?php
    //echo validation_errors("<li>", "</li>");
?>
<!-- Edit Form -->
<div class="formPanel">
    <form method="post" action="<?php echo base_url(); ?>admin_combo/product/get_unit_price/">
        <fieldset>
            <legend>Phiếu Nhập</legend>
            <label>Nhà cung cấp</label>
            <select id="slProvider" name="slProvider">
                <?php
                    callProvider($info_provider, $this->session->userdata("sess_prov_id"));
                ?>
            </select><br /><br />
            <label>&nbsp;</label><input type="submit" class="button" value="Lấy đơn giá" />
            <table>
                <tr>
                    <td class="title">Id</td>
                    <td class="title">Số Lượng</td>
                    <td class="title">Đơn Giá</td>
                    <td class="title">Tên</td>
                    <td class="title">Thành Tiền</td>
                </tr>
                <?php
                foreach($cart_content as $item) {
                    echo "<tr>";
                    echo    "<td>$item[id]</td>";
                    echo    "<td>$item[qty]</td>";
                    echo    "<td>$item[price]</td>";
                    echo    "<td>$item[name]</td>";
                    echo    "<td>$item[subtotal]</td>";
                    echo "</tr>";
                }
                ?>
                <tr>
                    <td colspan="4" class="title">Tổng cộng: </td>
                    <td><b><?php echo $this->cart->total(); ?></b></td>
                </tr>
            </table>
            <?php 
                if($this->session->userdata("sess_prov_id")) {
            ?>
            <div style="margin-bottom: 10px; margin-top: 10px; margin-left: 10px; float: right;"><a href="<?php echo base_url(); ?>admin_combo/product/input_order" class="button" style="padding: 5px;">Nhập phiếu</a></div>
            <div style="margin-bottom: 10px; margin-top: 10px; margin-left: 10px; float: right;"><a href="<?php echo base_url(); ?>admin_combo/product/cart_destroy" class="button" style="padding: 5px;">Hủy</a></div>
            <?php } ?>
        </fieldset>
    </form>    
</div>
